Note: This statement is named Starts with Substring in the Add Statement dialog box.
Returns True or False to indicate if a string starts with a substring.
Syntax
StartsWithSubStr("FullString", "Substring", IsCaseSensitive)
Arguments
| Argument | Description |
|---|---|
| FullString | Full string to search. |
| Substring | Substring to search for in the full string. |
| IsCaseSensitive | Case sensitive search. True matches the substring case. False ignores the case. If not specified, True is used. |
Return value
| Value | Description |
|---|---|
| True | String starts with the substring. |
| False | String does not start with the substring. |
Example
productName = Window("Bug Reporter").HTMLElement("elementProductName").Property("Inner Text")
CheckpointExpression(StartsWithSubStr(productName, "WysiCorp", True), True, "Product name does not start with WysiCorp")